<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../../org/angular.min.js"></script>
</head>

<body ng-app="app" ng-controller="ctrl">
    <span ng-bind="name"></span>
    <script>
        var m = angular.module('app', []);
        m.controller('ctrl', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
            //创建缓存仓库
            var store = $cacheFactory('store');
            //存放数据
            store.put('web', {
                'title': '腾讯能视频',
                url: 'www.qq.com'
            });
            store.put('user', {
                'name': 'zyx',
                'email': '572221567@qq.com'
            });
            //删除数据
            // store.remove('web');//按名删
            // store.removeAll();//全删
            // store.destroy();//把缓存仓库也删掉
            //取数据
            console.log(store.get('web'));
            console.log(store.get('user'))
        }])
    </script>
</body>

</html>
